/**
 * fileName:  FruitNutritionBean.java
 * author:  huaimi
 * Company:  Cloudland Studio
 * Createdate:  2014-6-9 下午8:20:32
 *
 * All rights Reserved, Designed By cloudland Copyright(C) 2010-2011
 *   
 * Modification  History:
 *     Date           Author        Version        
 * -------------------------------------------
 * 2014-6-9          huaimi            1.0        
 *
 * Why & What is modified:
 * 1.0: 文件创建
 */
package org.cloudland.commercial.masterdata.handler.support;

import org.cloudland.commercial.masterdata.bean.FruitNutrition;
import org.cloudland.commercial.masterdata.bean.NutritionType;
import org.cloudland.commercial.masterdata.store.entity.FruitNutritionEntity;
import org.cloudland.commercial.masterdata.store.entity.NutritionEntity;

 /**
 * 水果营养关系属性实现类，提供领域水果营养关系的属性获取实现
 * @ClassName  FruitNutritionBean
 * @author  huaimi
 * @version  %I%, %G%
 * @see  
 * @since   JDK1.6
 *
 */
public class FruitNutritionBean implements FruitNutrition
{
	
	/**
	 * fruitNutritionEntity 水果营养信息实体
	 */
	private FruitNutritionEntity fruitNutritionEntity;
	
	/**
	 * nutritionEntity 营养信息实体
	 */
	private NutritionEntity nutritionEntity;
	
	/**
	 * 
	 * 有参构造函数，初始化领域层水果营养关系属性
	 *
	 * @param fruitNutritionEntity 水果营养关系属性对象
	 */
	public FruitNutritionBean(FruitNutritionEntity fruitNutritionEntity, NutritionEntity nutritionEntity)
	{
		this.fruitNutritionEntity = fruitNutritionEntity;
		this.nutritionEntity = nutritionEntity;
		if (null != nutritionEntity) {
			fruitNutritionEntity.setNutritionId(nutritionEntity.getId());
		}
	}
	
	/**
	 * 
	 * <pre>
	 * 获取营养编号
	 * </pre>
	 *
	 * @return
	 */
	public String getNutritionId()
	{
		return fruitNutritionEntity.getNutritionId();
	}

	/**
	 * @return
	 */
	public String getNutritionName() {
		return nutritionEntity.getName();
	}
	
	/**
	 * 
	 * <pre>
	 *  获取营养含量
	 * </pre>
	 *
	 * @return
	 */
	public Double getNutritionScalar()
	{
		return fruitNutritionEntity.getNutritionScalar();
	}
	
	/**
	 * @param nutritionScalar
	 */
	public void setNutritionScalar(Double nutritionScalar) {
		fruitNutritionEntity.setNutritionScalar(nutritionScalar);
	}

	/**
	 * 
	 * <pre>
	 *  获取营养含量
	 * </pre>
	 *
	 * @return
	 */
	public Integer getCalculate()
	{
		return fruitNutritionEntity.getCalculate();
	}
	
	/**
	 * @param unit
	 */
	public void setUnit(Integer unit) {
		fruitNutritionEntity.setCalculate(unit);
	}
	
	/**
	 * @return
	 */
	public Integer getUnit() {
		return fruitNutritionEntity.getCalculate();
	}

	/**
	 * 
	 * <pre>
	 *  获取排序
	 * </pre>
	 *
	 * @return
	 */
	public Integer getSort()
	{
		return fruitNutritionEntity.getSort();
	}
	
	/**
	 * 
	 * <pre>
	 *  设置营养素排序
	 * </pre>
	 *
	 * @param sort
	 */
	public void setSort(Integer sort)
	{
		fruitNutritionEntity.setSort(sort);
	}
	
	
	/**
	 * 
	 * <pre>
	 * 获取营养类型
	 * </pre>
	 *
	 * @return
	 */
	public NutritionType getNutritionType()
	{
		return nutritionEntity.getType();
	}
	
	
	
}
